
<style>
    .pagevideos{
        float:left;
        padding:3px 5px;
        margin-right:3px;
        background: #CCC;
        border:#c2c2c2 solid 1px;
        border-radius:3px;
    }
</style>
<div class="page-header" id="hideshowtitle">
    <h1>Quản lí videos.</h1>
    <input type="text" class="form-control" style="width: 25%; display: inline;" id="inputsearch" name="jq-validation-required" placeholder="Nhập thông tin tìm kiếm.">
    <button style="vertical-align: inherit;" onclick="showall(1, 2)" class="btn btn-success"><i class="menu-icon fa fa-search"></i> Tìm kiếm</button>
    <button style="vertical-align: inherit;" onclick="showall(1, 1)" class="btn btn-warning"><i class="menu-icon fa fa-refresh"></i> Làm mới</button>
    <a class="btn btn-danger" onclick="effaddnew()" style="float: right;" title=""><i class="menu-icon fa fa-bars"></i> Thêm videos</a>
</div> <!-- / .page-header -->
<div class="page-header" id="hideAddtitle">
    <h1>Thêm mới videos</h1>
    <a class="btn btn-danger" onclick="showlist()" style="float: right;" title=""><i class="menu-icon fa fa-list"></i> Hiển thị dữ liệu.</a>
</div> <!-- / .page-header -->
<div class="page-header" id="hideedit">
    <h1>Chỉnh sửa videos</h1>
    <a class="btn btn-danger" onclick="showlist()" style="float: right;" title=""><i class="menu-icon fa fa-list"></i> Hiển thị dữ liệu.</a>
</div> <!-- / .page-header -->

<!--add new-->

<div class="row" id="ctaddnew">
    <div class="col-sm-12" >


        <div class="panel-heading" id="mesadd">
            <span class="panel-title" id="addOk" style="color: #C93C04"><i class="menu-icon fa fa-plus"></i> Vui lòng nhập thông tin bên dưới.</span>

        </div>
        <div class="panel-body">
            <form style="border:0px !important;" method="post" name="addvideos" class="panel form-horizontal" id="formimages" action="" enctype="multipart/form-data" onsubmit="return AIM.submit(this, {'onStart': startCallback, 'onComplete': completeCallback})">
                <div class="form-group has-success">
                    <label for="inputPassword" class="col-sm-2 control-label">Tiêu đề videos</label>
                    <div class="col-sm-10">
                        <input type="text"  required class="form-control" name="titlevideos" id="catename" placeholder="Nhập tiêu đề videos.">
                        <p class="help-block" id="catenamemes" style="color: red;"></p>
                        <p class="help-block">Ví dụ :Em của ngày hôm qua.</p>
                    </div>
                </div> <!-- / .form-group -->
                <div class="form-group">
                    <label for="inputPassword" class="col-sm-2 control-label">Chuyên mục</label>
                    <div class="col-sm-10">
                        <select name="categories">
                            <?php
                            foreach ($listcate as $key => $listcateadd) {
                                echo '<option value="' . $listcateadd["cateId"] . '">' . $listcateadd["cateName"] . '</option>';
                            }
                            ?>

                        </select>
                    </div>
                </div> <!-- / .form-group -->
                <div class="form-group has-success">
                    <label for="inputPassword" class="col-sm-2 control-label">Mô tả</label>
                    <div class="col-sm-10">
                        <textarea class="form-control textf" id="descate" name="desvideos" rows="3"></textarea>
                        <p class="help-block">Ví dụ :Em của ngày hôm qua - Ca sĩ thể hiện Sơn tùng.(Mặc định :Chưa có mô tả cho videos này.)</p>
                    </div>
                </div> <!-- / .form-group -->
                <div class="form-group has-success">
                    <label for="inputPassword" class="col-sm-2 control-label">HÌnh ảnh</label>
                    <div class="col-sm-10">
                        <script>
					init.push(function () {
						$('#styled-finputs-example').pixelFileInput({ placeholder: 'Hoặc chọn file để tải lên từ máy tính của bạn....' });
					})
				</script>
                        <input type="text" name="urlimg" id="urlimg" class="form-control" placeholder="Hãy nhập url hình ảnh muốn lấy về."/>
                         <p class="help-block">Ví dụ :http://duypc.vn/vidu.jpg</p><br/>
                        <input type="file" name="imgvideos" id="styled-finputs-example" />
                        
                        <p class="help-block" style="color: red;">Hoặc chọn ảnh để tải lên từ máy tính của bạn.</p>
                    </div>
                </div> <!-- / .form-group -->
                <div class="form-group has-success">
                    <label for="inputPassword" class="col-sm-2 control-label">IFrame</label>
                    <div class="col-sm-10">
                        <textarea class="form-control textf" id="descate" required name="iframevideos" rows="3"></textarea>
                        <p class="help-block">Ví dụ :<?php echo htmlspecialchars("<irame src='Đường dẫn videos'></irame>") ?></p>
                    </div>
                </div> <!-- / .form-group -->
                <div class="form-group" style="margin-bottom: 0;">
                    <div class="col-sm-offset-2 col-sm-10">
                        <button type="submit" name="btn" value="btn" class="btn btn-success "><i class="fa fa-upload"></i> Thêm mới</button>
                        <a href="javascript:void(0);" onClick="effcloseaddnew();" class="btn btn-warning "><i class="fa fa-times"></i> Hủy bỏ</a>
                    </div>
                </div> <!-- / .form-group -->
            </form>
        </div>

        <!-- /10. $FORM_EXAMPLE -->

    </div>
</div>



<div class="row" style="display: none;" id="ctedit">
    <div class="col-sm-12" >


        <div class="panel-heading" id="mesadd">
            <span class="panel-title" id="addOk" style="color: #C93C04"><i class="menu-icon fa fa-plus"></i> Vui lòng nhập thông tin bên dưới.</span>

        </div>
        <form style="border:0px !important;" method="post" name="updatevideos" class="panel form-horizontal" id="formimages" action="<?php echo WEB_PATH; ?>/controlpanel/videos/updatevideos" enctype="multipart/form-data" onsubmit="return AIM.submit(this, {'onStart': startCallbackup, 'onComplete': completeCallbackup})">

            <div class="panel-body" id="editvdeo">

            </div>
        </form>
        <!-- /10. $FORM_EXAMPLE -->

    </div>
</div>


<!--end add cate-->
<div class="row" id="hidelist">
    <div class="col-sm-12">
        <div class="panel">
            <div class="panel-heading">
                <span class="loaddingvv" id="loadding"><img src="<?php echo WEB_PATH; ?>public/loading.gif" width="16" height="16"/></span>
                <span class="panel-title" style="color: #366a10;"><i class="menu-icon fa fa-list-ul"></i> Danh sách videos.</span>
                <i class="fa fa-list-ol"></i> 
                <select id="numberpage" onchange="showall(1,1);">
                    <option value="10">10</option>
                    <option value="20">20</option>
                    <option value="30">30</option>
                    <option value="40">40</option>
                    <option value="50">50</option>
                    <option value="100">100</option>
                    <option value="200">200</option>
                    <option value="250">250</option>
                </select> 
                
                <i class="fa fa-filter"></i> <select name="catefinter" id="catefinter" onchange="showall(1, 3);">
                    <option value="0">Lọc theo chuyên mục</option>
                    <?php
                    foreach ($listcate as $key => $listcatee) {
                        echo '<option value="' . $listcatee["cateId"] . '">' . $listcatee["cateName"] . '</option>';
                    }
                    ?>
                </select> 
                 <i class="fa fa-sort-alpha-desc"></i> 
                 Sắp xếp :<select id="sortbycol">
                    <option value="videoId">Mã videos</option>
                    <option value="videodate">Ngày đăng</option>
                    <option value="videoTitle">Tiêu đề videos</option>
                </select> <i class="fa fa-arrows-h"></i> 
                <select id="sortby" onchange="showall(1,1);">
                    <option value="0">Sắp xếp theo</option>
                    <option value="DESC">Mới -> Cũ</option>
                    <option value="ASC">Cũ -> Mới</option>
                </select>
            </div>
            <input type="hidden" id="url" value="<?php echo WEB_PATH ?>superadmin/videos.fy"/>
            <div class="panel-body">
                <form style="border:0px !important;" method="post" name="addvideos" class="panel form-horizontal" id="formimages" action="<?php echo WEB_PATH; ?>/controlpanel/videos/addvideos" enctype="multipart/form-data" onsubmit="return AIM.submit(this, {'onStart': startCallback, 'onComplete': completeCallback})">

                    <table class="table">
                        <thead>
                            <tr>
                                <th>STT</th>
                                <th>Tiêu đề video</th>
                                <th>Chuyên mục</th>
                                <th>Mô tả</th>
                                <th>Đăng lúc</th>
                                <th>#</th>

                            </tr>
                        </thead>
                        <tbody id="listView">

                        </tbody>



                    </table>
                </form>
            </div>
        </div>
        <!-- /5. $DEFAULT_TABLES -->

    </div>

</div>
<!--edit-->
<style type="text/css">
    #editvideodiv{
        display: none;
    }
</style>
<div class="row" id="editvideodiv">
    <div class="col-sm-12" >


        <div class="panel-heading" id="mesadd">
            <span class="panel-title" id="addOk" style="color: #C93C04"><i class="menu-icon fa fa-plus"></i> Vui lòng nhập thông tin bên dưới.</span>

        </div>
        <div class="panel-body" id="dataedit">
            <!--start show form edit-->
            <!--//start show form edit-->
            
        </div>

        <!-- /10. $FORM_EXAMPLE -->

    </div>
</div>
<script src="<?php echo WEB_PATH_HEADER; ?>ajaxsite/videosajax.js"></script>